package error_code

import (
	"fmt"

	"servers/models/define"
)

func NewError(code define.ErrorCode) error {
	return &AppError{code}
}

type AppError struct {
	Code define.ErrorCode
}

func (a *AppError) Error() string {
	return fmt.Sprintf("app code:%v", a.Code)
}
